/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Clases;



import java.net.*;
import java.io.*;

public class MainServer {
    public static void main(String[] args) throws IOException {
        
        ServerSocket serverSocket = null;
        boolean listening = true;
        final int puerto = 4444;
        

        try {
            serverSocket = new ServerSocket(puerto);
        } catch (IOException e) {
            System.err.println("Could not listen on port: 4444.");
            System.exit(-1);
        }
        System.out.println("Esperando Cliente...");
        while (listening)
          new HiloManejadorClientes(serverSocket.accept()).start();

        serverSocket.close();
    }
}

